package com.example.demo.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import com.example.demo.entity.Desk;



@Repository
public interface Desk_Mapper extends Basic_Mapper<Desk> {
	
	@Select("select * from Desk ${where} ${limit}")
	public List<Desk> select(@Param("where")String where,@Param("limit") String limit);
	
	@Delete("delete from Desk where id=#{id}")
	public void delete(int id);
	
	@Insert("insert into Desk(name,status) values(#{name},#{status})")
	public void insert(Desk t);
	
	@Update("update Desk set name=#{name},status=#{status} where id=#{id}")
	public void update(Desk t);
	
	@Select("select * from Desk where id=#{id}")
	public Desk getById(int id);
}
